import static org.junit.Assert.*;

import org.junit.Test;


public class ScorableTest
{
    private Domino domino;
    private int right;
    private int left;

    /**
     * Construct new domino. Test the getRight, getLeft, rotate, and getScore
     * methods.
     * 
     * Runs 100 times.
     */
    @Test
    public void test()
    {
 
        for(int i = 0; i < 100; i++)
        {
            for(int j = 0; j < 100; j++)
            {
            
                domino = new Domino(i, j);
            
                assertTrue(domino.getLeft() == i);
                assertTrue(domino.getRight() == j);

            
                domino.rotate();
            
                assertTrue(domino.getLeft() == j);
                assertTrue(domino.getRight() == i);
                
                domino.rotate();
                
                assertTrue(domino.getLeft() == i);
                assertTrue(domino.getRight() == j);
            
                assertTrue(domino.getScore() == i + j);
            }

        }
    }


}

